<?

/*
if ($Error){
	echo "<div style='font-size:20px; color:#FF0000;'><strong>{$Error}</strong></div>";
}else{
	echo "
<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
<title>$invoice[invoice_type]</title>
<style>
body {
	background-color:#FFFFFF;
	padding:0px;
	margin:0px;
	color:#000000;
}

.iTable {
	border: 1px solid #6C9DCE;
	font-family:Tahoma, Verdana, Arial, Helvetica, sans-serif;
	font-size:11px;
	color:#000000;
}

.iTable th {
	background-image: url('/images/bkg_arrow_i.gif');
}

.cTable {
	border: 1px solid #E7637B;
	font-family:Tahoma, Verdana, Arial, Helvetica, sans-serif;
	font-size:11px;
	color:#000000;
}

.cTable th {
	background-image: url('/images/bkg_arrow_c.gif');
}

td {
	font-family:Tahoma, Verdana, Arial, Helvetica, sans-serif;
	font-size:11px;
	color:#000000;
}
</style>
</head>
<body>
<table align='center' width='490' border='0' cellspacing='0' cellpadding='0'>
	<tr>
		<td height='90' style='border-bottom:1px solid #000000;'>
			<table width='100%' border='0' cellspacing='0' cellpadding='0'>
				<tr>
					<td style='font-size:24px; color:#FF0000;'><strong>$invoice[store]</strong></td>
					<td align='right'>
						$invoice[invoice_type] No: <strong style='font-size:14px'>$invoice[invoice_number]</strong><br />
						<strong>$invoice[invoice_date]</strong>
					</td>
				</tr>
			</table>
		</td>
	</tr>
	<tr>
		<td>
			<table width='100%' border='0' cellspacing='0' cellpadding='0'>
				<tr>
					<td style='padding-top:30px; padding-bottom:20px;'><p align='center' style='font-size:18px'><strong>".strtoupper($invoice[invoice_type])."</strong></p>
						".($invoice[invoice_type] == 'Invoice' ? "<p>Thank you for ordering from &quot;$invoice[store]&quot;. &quot;$invoice[store]&quot; is in a association with $invoice[company_name] a $invoice[company_country] company and this email is an INVOICE issued by $invoice[company_name] for <strong>ORDER ID $invoice[order_id]</strong>.</p>" : "<p>Thank you for ordering from &quot;$invoice[store]&quot;. &quot;$invoice[store]&quot; is in a association with $invoice[company_name] a $invoice[company_country] company and this email is a CREDIT NOTE issued by $invoice[company_name] for <strong>ORDER ID $invoice[order_id]</strong>.</p>")."
					</td>
				</tr>
				<tr>
					<td>
						<table width='100%' border='0' cellspacing='0' cellpadding='0'>
							<tr>
								<td valign='top'>
									".($invoice[invoice_type] == 'Invoice' ? "<table class='iTable' width='100%' cellspacing='0' cellpadding='0'>" : "<table class='cTable' width='100%' cellspacing='0' cellpadding='0'>")."
										<tr>
											<th width='10' height='21' align='left'>
												".($invoice[invoice_type] == 'Invoice' ? "<img src='/images/arrow.gif' alt='' width='10' height='21'>" : "<img src='/images/arrow_c.gif' alt='' width='10' height='21'>")."
											</th>
											<th width='190' align='left'><strong>FROM:</strong></th>
										</tr>
										<tr>
											<td height='120' valign='top'>&nbsp;</td>
											<td height='120' valign='top'><br />
												".nl2br($invoice[company_details])."
											</td>
										</tr>
									</table>
								</td>
								<td width='20'>&nbsp;</td>
								<td>
									".($invoice[invoice_type] == 'Invoice' ? "<table class='iTable' width='100%' cellspacing='0' cellpadding='0'>" : "<table class='cTable' width='100%' cellspacing='0' cellpadding='0'>")."
										<tr>
											<th width='10' height='21' align='left'>
												".($invoice[invoice_type] == 'Invoice' ? "<img src='/images/arrow.gif' alt='' width='10' height='21'>" : "<img src='/images/arrow_c.gif' alt='' width='10' height='21'>")."
											</th>
											<th width='190' align='left'><strong>TO:</strong></th>
										</tr>
										<tr>
											<td height='120' valign='top'>&nbsp;</td>
											<td height='100' valign='top'><br />
												".($invoice[client_company_name] ? "$invoice[client_company_name]<br />" : "")."
												$invoice[client_full_name]<br />
												".nl2br($invoice[client_location])."<br />
												Tel: $invoice[client_phone]<br />
												E-mail: <a href='mailto:$invoice[client_email]'>$invoice[client_email]</a>
                  							</td>
										</tr>
									</table>
									<br /><br />
								</td>
							</tr>
						</table>
					</td>
				</tr>
				<tr>
					<td height='1' background='/images/bkg_invoice_dots.gif'></td>
				</tr>
				<tr>
					<td>
						<table width='100%' border='0' cellspacing='0' cellpadding='0'>
							<tr>
								<td width='100' valign='top'>
									<br />
									$invoice[invoice_type] No:<br />
									$invoice[invoice_type] Date:<br />
									Billing Method:<br />
									Transaction ID:
								</td>
								<td valign='top'>
									<br /><strong>$invoice[invoice_number]
									<br />$invoice[invoice_date]
									<br />$invoice[payment_method]
									<br />$invoice[order_number]</strong> <em>($invoice[order_date])</em><br /><br />
								</td>
							</tr>
						</table>
					</td>
				</tr>
				<tr>
					<td>
						".($invoice[invoice_type] == 'Invoice' ? "<table class='iTable' width='100%' cellspacing='0' cellpadding='0'>" : "<table class='cTable' width='100%' cellspacing='0' cellpadding='0'>")."
							<tr>
								<th width='15' height='21'align='left'>
									".($invoice[invoice_type] == 'Invoice' ? "<img src='/images/arrow.gif' alt='' width='10' height='21'>" : "<img src='/images/arrow_c.gif' alt='' width='10' height='21'>")."
								</th>
								<th width='473' align='left'><strong>DESCRIPTION:</strong></th>
							</tr>
							".($invoice[invoice_type] == 'Invoice' ? "<tr>
								<td valign='top'>&nbsp;</td>
								<td valign='top'>
									<br />
									".nl2br($invoice[payment_details])."
								</td>
							</tr>" : "")."
							<tr>
								<td valign='top'>&nbsp;</td>
								<td valign='top' align='right' style='padding:10px;'>
									".($invoice[invoice_type] == 'Invoice' ? "
									Amount: <strong>$invoice[amount_total]</strong> $invoice[currency]<br>
									Total Order Value: <strong>$invoice[amount_total]</strong> $invoice[currency]<br>
									Total Paid: <strong>$invoice[amount_total]</strong> $invoice[currency]" : "
									Amount: <strong><font color='Red'>$invoice[amount_total]</font></strong> $invoice[currency]<br>
									Total Order Value: <strong><font color='Red'>$invoice[amount_total]</font></strong> $invoice[currency]<br>
									Total Paid: <strong><font color='Red'>$invoice[amount_total]</font></strong> $invoice[currency]")."
								</td>
							</tr>
						</table>
						<br /><br />
					</td>
				</tr>
				<tr>
					<td height='1' background='/images/bkg_invoice_dots.gif'></td>
				</tr>
				<tr>
					<td>
						".($invoice[invoice_type] == 'Invoice' ? "
						<br /><p><strong>NOTE:</strong><br /> &quot;$invoice[store]&quot; operates on behalf of $invoice[company_name] and this e-mail is an invoice issued by $invoice[company_name] for Order No. $invoice[order_id]. Therefore the entry on your Bank/Credit Card Statement in relation to the above transaction will contain the name of $invoice[company_name]</p>" : "
						<br /><p><strong>NOTE:</strong><br /> &quot;$invoice[store]&quot; operates on behalf of $invoice[company_name] and this e-mail is a credit note issued by $invoice[company_name] for Order No. $invoice[order_id]. Therefore the entry on your Bank/Credit Card Statement in relation to the above transaction will contain the name of $invoice[company_name]</p>")."

						<p><strong>CONTACT INFORMATION:</strong><br />If you have any queries about this transaction, please call our customer services team via e-mail at <a href='mailto:$invoice[company_email]'>$invoice[company_email]</a> or on Tel. Nos.</p>

						<blockquote><strong>$invoice[company_phone]</strong><br />
						<strong>$invoice[company_fax]</strong></blockquote>
						<p>quoting your <strong>Order ID $invoice[order_id]</strong>.</p><br />
					</td>
				</tr>
			</table>
		</td>
	</tr>
	<tr>
		<td align='center' style='border-top:1px solid #000000; padding-top:10px;'>
			<p style='font-size:10px;'>
			<strong>$invoice[company_name]</strong> Company Registered in $invoice[company_country], Registration No. $invoice[company_registration_id]<br />
			Registered Office Address: $invoice[company_details]</p>
		</td>
	</tr>
</table>
</body>
</html>
";
}
unset($dbh);
*/
?>